Telegram Group & Telegram Channel
Исполняем код в виде строки

В предыдущем посте мы рассказали про проект, который использует функцию exec. Так вот, эта функция нужна для того, чтобы выполнять код, переданный в виде строки.

Первым аргументом передается сама строка, в которой записан код, а также можно передать еще два опциональных аргумента globals и locals в виде словарей.

Но в продакшне такое использовать не рекомендуется, так как подобная штука крайне небезопасна. А для общего развития знать полезно.

#exec



tg-me.com/python_academy/428
Create:
Last Update:

Исполняем код в виде строки

В предыдущем посте мы рассказали про проект, который использует функцию exec. Так вот, эта функция нужна для того, чтобы выполнять код, переданный в виде строки.

Первым аргументом передается сама строка, в которой записан код, а также можно передать еще два опциональных аргумента globals и locals в виде словарей.

Но в продакшне такое использовать не рекомендуется, так как подобная штука крайне небезопасна. А для общего развития знать полезно.

#exec

BY Python Academy




Share with your friend now:
tg-me.com/python_academy/428

View MORE
Open in Telegram


Python Academy Telegram | DID YOU KNOW?

Date: |

Telegram announces Search Filters

With the help of the Search Filters option, users can now filter search results by type. They can do that by using the new tabs: Media, Links, Files and others. Searches can be done based on the particular time period like by typing in the date or even “Yesterday”. If users type in the name of a person, group, channel or bot, an extra filter will be applied to the searches.

China’s stock markets are some of the largest in the world, with total market capitalization reaching RMB 79 trillion (US$12.2 trillion) in 2020. China’s stock markets are seen as a crucial tool for driving economic growth, in particular for financing the country’s rapidly growing high-tech sectors.Although traditionally closed off to overseas investors, China’s financial markets have gradually been loosening restrictions over the past couple of decades. At the same time, reforms have sought to make it easier for Chinese companies to list on onshore stock exchanges, and new programs have been launched in attempts to lure some of China’s most coveted overseas-listed companies back to the country.

Python Academy from cn


Telegram Python Academy
FROM USA